package routes

import (
	"github.com/gin-gonic/gin"
	"iot-base/auth/api/handler/gate"
	"iot-base/auth/config"
	auth2 "iot-base/auth/middleware/auth"
)

func InitGateRoute(g *gin.Engine) {
	routePath := g.Group(config.Conf.Server.Prefix + "/" + config.Conf.Server.Version + "/gate").Use(auth2.JWTAuth())
	{
		routePath.POST("/pop", gate.Add)
		routePath.PUT("/pop", gate.Modify)
		routePath.DELETE("/pop", gate.Delete)
		routePath.GET("/select", gate.SelectList)
		routePath.GET("/userGate", gate.UserGate)
	}
}
